package  
{
	import net.flashpunk.Entity;
	import net.flashpunk.graphics.Image;
	import net.flashpunk.utils.Input;
	import net.flashpunk.utils.Key;
	import net.flashpunk.FP;
	
	/**
	 * ...
	 * @author Dyego
	 */
	public class Menu extends Entity 
	{
		[Embed(source = 'assets/Menu.jpg')] private const MENU:Class;
		
		public function Menu() 
		{
			graphic = new Image(MENU);
			type = "menu";
		}
		
		override public function update():void
		{
			if (Input.check(Key.ENTER))
			{
				this.destroiMenu();
				FP.world = new Mundo();
			}
		}
		
		public function destroiMenu():void
		{
			FP.world.remove(this);
		}
		
	}

}